package com.woniu.controller;

import com.woniu.filter.BloomFilterInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@RestController
public class BloomController {

    @Autowired
    private BloomFilterInterceptor bloomFilterInterceptor;

    @GetMapping("/product/{id}")
    public void pro(@PathVariable String id, HttpServletRequest request, HttpServletResponse response) throws IOException {
        bloomFilterInterceptor.preHandle(request,response,id) ;
    }

}
